package com.cn.dream_order_server.service.impl;

import com.cn.dream_order_server.mapper.OrderOrderMapper;
import com.cn.dream_order_server.pojo.OrderOrder;
import com.cn.dream_order_server.service.PublicWsfOrderOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;


@Service
public class PublicWsfOrderOrderServiceImpl implements PublicWsfOrderOrderService {


    @Autowired
    private OrderOrderMapper orderOrderMapper;

    //获取某个时间的订单数据
    @Override
    public List<OrderOrder> getOrderByDay(Date date) {
        List<OrderOrder> orderOrders = orderOrderMapper.selectPlaceByTimeDay(date);
        return orderOrders;
    }
    //获取某个时间段之间订单数据
    @Override
    public List<OrderOrder> getAllOrderByTime(Date before,Date after) {

        List<OrderOrder> orderOrders = orderOrderMapper.selectPlaceByTime(before,after);

        return orderOrders;
    }
}
